45/57

# orch.dbg.output

Directs the output from the debugger.

Usage

    orch.dbg.output(con)

Arguments

con

  Identifies the stream where the debugging information is sent: `stderr()`, `stdout()`, or a file name.

Usage Notes

You must first turn on debugging mode before redirecting the output.

Return Value

The current stream

See Also

`orch.dbg.on`

Example

This example turns on debugging mode and sends the debugging information to `stderr`. The `orch.dbg.output` function returns a description of `stderr`.

    R> orch.dbg.on('all')
    R> err<-orch.dbg.output(stderr())
    17:32:11 [SY] debug output set to "stderr"
    R> print(err)
    description          class     mode      text    opened    can read    can write
       "stderr"     "terminal"      "w"    "text"   "opened"       "no"        "yes"

The next example redirects the output to a file named debug.log:

    R> err<-orch.dbg.output('debug.log')
    17:37:45 [SY] debug output set to "debug.log"
    R> print(err)
    [1] "debug.log"